package com.jg.controller;

import com.jg.comm.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 86130
 * @version 1.0
 * @description: TODO
 * @date 2025/9/8 上午9:11
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

    @Value("${filePath}")
    private String filePath;

    @Autowired
    private User user;

    @Value("${user.uname}")
    private String name;

    @GetMapping("/hi")
    public String hi(String name) {
        System.out.println("filePath:" + filePath);
        return name + "say: hello world";
    }

    @GetMapping("/hi1")
    public String hello(){
        System.out.println("name:" + name);
        return user.toString();
    }
}
